Don't crash if there is no cache. (#170652, Diego Gonzalez)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Mar 2005 18:13:46 +0000 (18:13 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 17 Mar 2005 18:13:46 +0000 (18:13 +0000)
2005-03-17  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkicontheme.c (theme_lookup_icon): Don't crash
if there is no cache.  (#170652, Diego Gonzalez)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkicontheme.c

index a24a0a3e4691d25bd5f097e975bfa5ebe0c78116..99c2c972f1ba5df6700d3913ed6d74210a114366 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-03-17  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash
+       if there is no cache.  (#170652, Diego Gonzalez)
+       
        * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): 
        Make inline completion insert the prefix at the
        right spot.  (#170146, Doug Quale)
index a24a0a3e4691d25bd5f097e975bfa5ebe0c78116..99c2c972f1ba5df6700d3913ed6d74210a114366 100644 (file)
@@ -1,5 +1,8 @@
 2005-03-17  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash
+       if there is no cache.  (#170652, Diego Gonzalez)
+       
        * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): 
        Make inline completion insert the prefix at the
        right spot.  (#170146, Doug Quale)
index a24a0a3e4691d25bd5f097e975bfa5ebe0c78116..99c2c972f1ba5df6700d3913ed6d74210a114366 100644 (file)
@@ -1,5 +1,8 @@
 2005-03-17  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkicontheme.c (theme_lookup_icon): Don't crash
+       if there is no cache.  (#170652, Diego Gonzalez)
+       
        * gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix): 
        Make inline completion insert the prefix at the
        right spot.  (#170146, Doug Quale)
index b5000fd5c7d0fb1b3df96c254d3e2bc0cb6e7a5f..d487fd8847308797fbe5ff59b4449931c8777c23 100644 (file)
@@ -1891,7 +1891,7 @@ theme_lookup_icon (IconTheme          *theme,
       
       if (min_dir->icon_data != NULL)
        icon_info->data = g_hash_table_lookup (min_dir->icon_data, icon_name);
-      else
+      else if (min_dir->cache != NULL)
        icon_info->data = _gtk_icon_cache_get_icon_data (min_dir->cache, icon_name, min_dir->subdir);
 
       if (icon_info->data == NULL &&